package chatNI;

import java.io.IOException;
import java.net.DatagramPacket;

/**
 * <b>Project ChatSystemG2 - INSA 4INFOA1 - 2013/2014</b>
 * <P>
 * <i>Package  chatNI</i> <br>
 * RemoteApp is an interface. It contains the method used to send and receive messages. 
 *
 * @author Sergio Gonzalez - Marie-Charlotte Bideaud
 */

public interface RemoteApp {

	/**
	 * Datagrams reception method
	 */
	public void processReceive () throws IOException ;
	
	/**
	 * Method that sends a hello message using UDP
	 * 
	 * @param packet : DatagramPacket
	 * @throws IOException 
	 */
	public void sendHello (DatagramPacket packet) throws IOException ;
	
	/**
	 * Method that sends a goodbye message using UDP
	 * 
	 * @param packet : DatagramPacket
	 * @throws IOException 
	 */
	public void sendGoodbye (DatagramPacket packet) throws IOException ;
	
	/**
	 * Method that sends a text message using UDP
	 * 
	 * @param packet : DatagramPacket
	 * @throws IOException 
	 */
	public void sendTextMsg (DatagramPacket packet) throws IOException ;
	
	/**
	 * Method that sends a file request using UDP
	 * 
	 * @param packet : DatagramPacket
	 * @throws IOException 
	 */
	public void sendFileRequest (DatagramPacket packet) throws IOException ;
	
	/**
	 * Method that sends a file answer using UDP 
	 * 
	 * @param packet : DatagramPacket
	 * @throws IOException 
	 */
	public void sendFileAnswer (DatagramPacket packet) throws IOException ;
	
	/**
	 * Method that sends a file using TCP 
	 */
	public void sendFile () ;
}
